#version 330 core
out vec4 FragColor;

in vec2 TexCoords;

uniform sampler2D scene;
uniform sampler2D blurred;
uniform sampler2D depthTex;

uniform bool showDepth;

void main()
{             
    // FragColor = texture(depthTex, TexCoords);
    vec4 origin = texture(scene, TexCoords);
    vec4 blurvec = texture(blurred, TexCoords);
    float blur = texture(depthTex, TexCoords).r;

    // FragColor = vec4(mix(scenergb, blurrgb, blur), 1);
    FragColor = vec4(mix(origin.rgb, blurvec.rgb, blur), 1);
    if(showDepth)
        FragColor = texture(depthTex, TexCoords);
}